<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title><?=SITE_NAME."_".$scfg['base']['title']?></title>
<meta name="keywords" content="<?=$scfg['base']['keywords']?>" />
<meta name="description" content="<?=$scfg['base']['description']?>" />
<script type="text/javascript">
try{document.domain="<?=SITE_DOMAIN?>";}catch (e){};
var __scfg__ = {
	staticUrl:"<?=surl::get("static");?>",
	thisPage:"index"
};
</script>
<script type="text/javascript" src="<?=surl::get("static");?>www.js"></script>
</head>
<body>
<? tpl::import('header.tpl.php');?>
<script type="text/javascript">

</script>
<div id="Main">
  <div class="top">
    <div class="adshow" id="Main_top_adshow"></div>
    <div class="paty">
      <div class="box1 box-green">
        <div class="box2">
          <h2>活动</h2>
          <div class="box-wrap">
            <div class="box-content">
              <ul class="list1">
              <? 
			  foreach($activity as $v)
			  {
			  	 $v['subject_s'] =  g::substr($v['subject'],32);
				 $v['red'] && $v['subject_s'] = '<font color="#FF0000">'.$v['subject_s'].'</font>';
			  ?>
                <li><em><?=g::time($v['save_time'],1)?></em><a href="<?=$v['url']?>" title="<?=$v['subject']?>" target="_blank"><?=$v['subject_s']?></a></li>
           <? }?>
              </ul>
            </div>
          </div>
        </div>
        <div class="box3"><span></span></div>
      </div>
      <div class="box1 box-gray">
        <div class="box2">
          <h2>系统公告</h2>
          <div class="box-wrap">
            <div class="box-content">
              <ul class="list1">
              <? 
			  foreach($affiche as $v)
			  {
			  	 $v['subject_s'] =  g::substr($v['subject'],32);
				 $v['red'] && $v['subject_s'] = '<font color="#FF0000">'.$v['subject_s'].'</font>';
			  ?>
                <li><em><?=g::time($v['save_time'],1)?></em><a href="<?=$v['url']?>" title="<?=$v['subject']?>" target="_blank"><?=$v['subject_s']?></a></li>
           <? }?>
              </ul>
            </div>
          </div>
        </div>
        <div class="box3"><span></span></div>
      </div>
    </div>
    <div class="reg">
      <div class="fclear"> 
      	<a href="<?=surl::get('help')?>" target="_blank"><img src="<?=surl::get("static");?>imgs/freshmanbutton.gif" border="0" width="77" height="33" /></a> 
        <a href="<?=surl::get('help')?>" target="_blank"><img src="<?=surl::get("static");?>imgs/saftybutton.gif" border="0" width="77" height="33" /></a> 
        <a href="<?=surl::get('www')?>register.php" target="_blank"><img src="<?=surl::get("static");?>imgs/registbutton.gif" border="0" width="77" height="33" /></a> 
      </div>
      <div class="regad">
        <ul class="fleft">
        <?  $static = surl::get("static");
			for($i=0;$i<8;$i++)
			{
				$v = $txt_ad[$i];
				$v['subject_s'] =  g::substr($v['subject'],28);
				$v['red'] && $v['subject_s'] = '<font color="#FF0000">'.$v['subject_s'].'</font>';				
		?>        
          <li><img src="<?=$static?>imgs/middle.gif" align="absmiddle" width="10"/><a href="<?=$v['url']?>" title="<?=$v['subject']?>" target="_blank" /><?=$v['subject_s']?></a>&nbsp;</li>
        <? }?>
        </ul>
        <ul class="fleft">
        <? 
			for($i=8;$i<16;$i++){
				$v = $txt_ad[$i];
				$v['subject_s'] =  g::substr($v['subject'],28);
				$v['red'] && $v['subject_s'] = '<font color="#FF0000">'.$v['subject_s'].'</font>';		
		?>        
          <li><img src="<?=$static?>imgs/middle.gif" align="absmiddle" width="10"/><a href="<?=$v['url']?>" title="<?=$v['subject']?>" target="_blank" /><?=$v['subject_s']?></a>&nbsp;</li>
        <? }?>
        </ul>
      </div>
    </div>
  </div>
  <div class="fclear"></div>
  <div class="Left">
    <div id="Notice" class="block">
      <div class="Title">
        <h2>热门FAQ</h2>
      </div>
      <div class="con">
        <ul>
	   <? 
          foreach($hot_faq as $v)
          {
             $v['subject_s'] =  g::substr($v['subject'],36);
             $v['red'] && $v['subject_s'] = '<font color="#FF0000">'.$v['subject_s'].'</font>';
          ?>
          <li><a href="<?=$v['url']?>" title="<?=$v['subject']?>" target="_blank"><?=$v['subject_s']?></a></li>
       <? }?>
        </ul>
      </div>
    </div>
    <div id="Ranked" class="block">
      <div class="Title">
        <h2>推荐小店</h2>
      </div>
      <?
      //<!--div class="crt"><span class="rank">诚信</span>名稱</div-->
	  ?>
      <div class="con">
        <ul>
       <? 
          //<!--li><span class="rank">124</span><a href="#">超炫！把店铺</a></li-->
		  foreach($hot_shop as $v)
          {
             $v['subject_s'] =  g::substr($v['subject'],36);
             $v['red'] && $v['subject_s'] = '<font color="#FF0000">'.$v['subject_s'].'</font>';
          ?>
          <li><a href="<?=$v['url']?>" title="<?=$v['subject']?>" target="_blank"><?=$v['subject_s']?></a></li>
       <? }?>
        </ul>
      </div>
    </div>
    <div id="Ranked" class="block">
      <div class="Title">
        <h2>热门商品</h2>
      </div>
      <?
      //<!--div class="crt"><span class="rank">诚信</span>名稱</div-->
	  ?>
      <div class="con">
        <ul>
       <? 
          //<!--li><span class="rank">124</span><a href="#">超炫！把店铺</a></li-->
		  foreach($hot_pct as $v)
          {
             $v['subject_s'] =  g::substr($v['subject'],36);
             $v['red'] && $v['subject_s'] = '<font color="#FF0000">'.$v['subject_s'].'</font>';
          ?>
          <li><a href="<?=$v['url']?>" title="<?=$v['subject']?>" target="_blank"><?=$v['subject_s']?></a></li>
       <? }?>
        </ul>
      </div>
      <div class="kf"></div>
    </div>
  </div>
  <!--Left End-->
  <div class="Right">
    <div id="Intro">
      <div class="Title"><span class="more"></span>
        <h2>商品公類</h2>
      </div>
      <div class="con">
        <div style="padding-top:5px;text-align:left;" class="overflow" id="sort">
        <?
        $i=0;
		foreach($PctClass['sub'] as $k=>$v)
		{	
			if($i%3==0)
			{ 
				echo '<div class="sortThree '.(($i%6==0)?"":"sortBg").'">';
			}
		?>
           <div class="<?=(($i%3==2)?'sortListEnd':'sortList')?>">
              <div class="sortMain"><a href="<?=surl::get("search")."index.php?c1id={$k}";?>"><?=$PctClass['name'][$k]?></a></div>
              <ul class="sortItem">
              	<? 
					$j = 0;
					foreach($v as $kk=>$vv)
					{
				?>
                <li><a href="<?=surl::get("search")."index.php?c1id={$k}&c2id={$kk}";?>"><?=$vv['name']?></a> </li>
                <? 
						if($j>100) break;
						$j+=strlen($vv['name']);
					}
				?>
              </ul>
            </div>
        <? 
		 	if($i%3==2) echo "</div>";
			$i++;
		}
		?> 
        </div>
      </div>
    </div>
  </div>
  <!--Right End-->
</div>
<script type="text/javascript">
//Main_top_adshow
Player.flash('Main_top_adshow'
			,__scfg__.staticUrl+'swf/f.abelian.swf'
			,'bcastr_xml_url=bcastr.xml.php&IsShowBtn=1&TitleBgPosition=2&TitleBgAlpha=60'
			,500
			,200);
//class regad
$("ul","div.regad").each(function(i)
{
	if(i%2)
	{
		$('li:odd',this).css({'background':'#eeeeee'});
	}else
	{
		$('li:even',this).css({'background':'#eeeeee'});
	}
});
</script>
<!--Main End-->
<? tpl::import('foot.tpl.php');?>
</body>
</html>
